<div class = "page_title">
<p>教学酬金统计查询</p>
</div>
<div class="s_header">
	<div class="s_form_wrap" >
		<form action="<?php echo urlToAction("statistic", "coursequery");?>" method="post">
			<div id="query_bar">
				<span>
					<select name='type' class='select_style' id="course_type_select" >
						<option value='1' <?php if(isset($data['type'])&&$data['type']==1) echo "selected='selected'";?>>校内</option>
						<option value='2' <?php if(isset($data['type'])&&$data['type']==2) echo "selected='selected'";?>>校外</option>
					</select>
				</span>
				<span><span class="field_name">院系：</span>
					<select name='department' class='select_style' id="department_select">
					<?php foreach(getInstitutes() as $key => $value):?>
					<option <?php if(isset($data['department'])&&$data['department']==$key) echo "selected='selected'" ?> value='<?php echo $key;?>' <?php if($key==$_SESSION['userinfo']['department']) echo "selected='selected'"?> ><?php echo $value;?></option>
					<?php endforeach;?>
				</select>
				</span>
				<span><span class="field_name">年份：</span><input value="<?php echo (isset($data['year']))?$data['year']:date("Y");?>" id="year_input" name="year" type="text" maxlength="4" value="2012" style="ime-mode:disabled" onkeydown="if(event.keyCode==13)event.keyCode=9" onKeyPress="if ((event.keyCode<48 || event.keyCode>57)) event.returnValue=false"/></span>
				<span><span class="field_name">月份：</span><input value="<?php echo (isset($data['month']))?$data['month']:date("m");?>" id="month_input" name="month" type="text" maxlength="2" style="ime-mode:disabled" onkeyup="if(parseInt(value)>12) value='';" onkeydown="if(event.keyCode==13) event.keyCode=9;" onKeyPress="if ((event.keyCode<48 || event.keyCode>57)) event.returnValue=false"/></span>
				<span><div class="form_post button">查询</div></span>
			</div>
		</form>
	</div>
</div>
<?php if(isset($data["items"])):?>
<div class="s_content">
	<div class="s_table_head">
		<div id="title1" class ="head_title WIDTH40 ">序号</div>
		<div id="title2" class ="head_title WIDTH70">教师</div>
		<div id="title3" class ="head_title WIDTH90"><?php echo (isset($data['type'])&&$data['type']==1)?"工资号":"身份证/护照";?></div>
		<div id="title4" class="head_title WIDTH120">课程名称</div>
		<div id="title5" class="head_title WIDTH50">周课时</div>
		<div id="title6" class="head_title WIDTH40">周数</div>
		<div id="title7" class="head_title WIDTH70">本月课时</div>
		<div id="title8" class="head_title WIDTH100">课时酬金标准</div>
		<div id="title9" class="head_title WIDTH100">税前金额</div>
	</div>
	<div class = "s_table_content">
		<?php
		$list = array();
		if(isset($data['items']))
			$list = $data['items'];
		$i=1;
		foreach ($list as $row):
		?>
		<div class="s_line <?php if($i%2 == 0) echo "highlight"?>">
			<div class="WIDTH40"><?php echo $i;?></div>
			<div class="WIDTH70"><?php echo $row->teacherName;?></div>
			<div class="WIDTH90"><?php echo $row->credential;?></div>
			<div class="WIDTH120"><?php echo $row->courseName;?></div>
			<div class="WIDTH50"><?php echo $row->unit;?></div>
			<div class="WIDTH40"><?php echo $row->weekCount;?></div>
			<div class="WIDTH70"><?php echo $row->monthUnit;?></div>
			<div class="WIDTH100"><?php echo $row->salaryStandard.$row->getSalaryStandardAttr();?></div>
			<div class="WIDTH100"><?php echo $row->preSalary.$row->getSalaryFixAttr();?></div>
		</div>
		<?php $i++;
		endforeach;?>
	</div>
	<div class="operator clearfix">
			<a target='_blank' href='<?php $type = $data['type'];$department=$data['department'];$year = $data['year'];$month = $data['month'];echo urlToAction("statistic", "courseprint")."?type=$type&department=$department&year=$year&month=$month";?>'><div class="button">打印</div></a>
	</div>
</div>
<?php endif;?>
